<template>
    <div class="set-page">
		<div class="tab-list">
			<!-- <div class="items" @click="userClick">
				<div class="txt">
					<img src="../assets/images/xieyi.png" />
					<span class="marg-L1">用户协议</span>
				</div>
				<div class="">
                    <i class="el-icon-arrow-right"></i>
                </div>
			</div> -->
            <div class="items" @click="platformClick">
				<div class="txt">
					<img src="../assets/images/xieyi.png" />
					<span class="marg-L1">用户协议</span>
				</div>
				<div class="">
                    <i class="el-icon-arrow-right"></i>
                </div>
			</div>
			<div class="items" @click="psdClick">
				<div class="txt">
					<img src="../assets/images/key.png" />
					<span class="marg-L1">修改密码</span>
				</div>
				<div class="">
                    <i class="el-icon-arrow-right"></i>
                </div>
			</div>
			<div class="items" @click="goOutClick">
				<div class="txt">
					<img src="../assets/images/back.png" />
					<span class="marg-L1">退出登录</span>
				</div>
				<div class="t-as iconfont icon-jiantou2"></div>
			</div>
		</div>
	</div>
</template>
<script>
import {request} from "@/assets/js/utils/request"
import {http} from "@/assets/js/utils/http"
export default {
    data() {
        return{

        }
    },
    methods: {
        platformClick() {
            this.$router.push({
                path: '/platformAgreement'
            })
        },
        userClick() {
            this.$router.push({
                path: '/agreement'
            })
        },
        psdClick() {
            this.$router.push({
                path: '/psdChange'
            })
        },
        goOutClick() {
            request({
                url: '/logout',
                method: 'POST'
            }).then(res => {
                if(res.code == 200) {
                    localStorage.removeItem('token')
                    localStorage.removeItem('shopId')
                    this.$router.replace('/login')
                } else {
                    this.$message.error(res.message);
                }
            })
        }
    }
}
</script>
<style lang="less" scoped>
    .set-page{
            width: 100%;
            height: 100vh;
            border-radius: 8px;
            background: #FAFAFA;
            .tab-list{
                padding: 10px 20px;
                .items{
                    cursor: pointer;
                    padding: 10px 20px 20px 10px;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    background: #fff;
                    border-radius: 10px;
                    margin-bottom: 10px;
                    border-bottom: 2rpx solid #EBEBEB;
                    .txt{
                        font-size: 14px;
                        color: #383838;
                        display: flex;
                        align-items: center;
                        img{
                            width: 20px;
                        }
                    }
                }
            }
        }
</style>